/**
 * @System abcs-aspchain
 * @Description: Copyright: Copyright (c) 2018
 * Company: Aspire Technologies
 * @author zhongzifeng
 * @date 2018/12/6 17:12
 * @version V1.0
 */
package com.asp.aspchain.admin.ethereum;

import org.web3j.protocol.Web3jService;
import org.web3j.protocol.admin.methods.response.BooleanResponse;
import org.web3j.protocol.core.Request;
import org.web3j.protocol.geth.JsonRpc2_0Geth;

import java.util.Arrays;

/**
 *
 * @ClassName: Miner
 * @Description: 补充挖矿相关接口
 * @author zhongzifeng
 * @date 2018/12/6 17:12
 *
 */
public class Miner extends JsonRpc2_0Geth {

    public Miner(Web3jService web3jService) {
        super(web3jService);
    }

    /**
     * 设定主帐号
     * @param accountId 账号地址
     * @return
     */
    public Request<?, BooleanResponse> setEtherBase(String accountId) {
        return new Request<>(
                "miner_setEtherbase",
                Arrays.asList(accountId),
                web3jService,
                BooleanResponse.class);
    }

}
